#!/bin/bash
LOG_DIR="/var/log/app"
DAYS=30
find $LOG_DIR -name "*.log" -type f -mtime +$DAYS -exec rm -f {} \;